package org.hqmdev.singleton;

/**
 * Eager Initialization Singleton
 * Advantage: easy to create a singleton class
 * Drawback: singleton instance is created at the time of class loading even 
 * though client application might not be using it 
 * @author hqm2zxy
 *
 */
public class EagerInitializedSingleton {
		
	private static final EagerInitializedSingleton instance = 
			new EagerInitializedSingleton();
	
	//private constructor to avoid client application to 
	//use constructor
	private EagerInitializedSingleton() {}
	
	public static EagerInitializedSingleton getInstance() {
		return instance;
	}
}
